﻿// 功能：展示COM调用的窗口
// 描述：
// 作者：温伟鹏
// 日期：2010/9/3 15:08:44

using System;
using System.Collections.Generic;
using System.Text;
using MeizuSDK.Presentation;
using System.Drawing;

namespace Demo
{
    /// <summary>
    /// 展示COM调用的窗口
    /// </summary>
    class COMWindow:DemoWindowBase
    {
        ScrollableControl scrollPanel = new ScrollableControl();

        Button cameraButton = new Button();

        public COMWindow()
        {
            scrollPanel = new ScrollableControl();
            scrollPanel.Size = new Size(Width, Height - ToolBar.HEIGHT);
            scrollPanel.Location = new Point(0, 0);
            Controls.Add(scrollPanel);

            cameraButton.Text = "Camera";
            cameraButton.Location = new Point(10, 10);
            cameraButton.Click += new EventHandler(cameraButton_Click);

            scrollPanel.Controls.Add(cameraButton);
        }

        void cameraButton_Click(object sender, EventArgs e)
        {
            CameraWindow win = new CameraWindow();
            win.ShowDialog(this);
        }
    }
}
